<script setup lang="ts">
    //定义子组件的属性
    defineProps(["title","subTitle"]);
</script>

<template>
    <section>
        <div>{{ title }}<span>{{ subTitle }}</span></div>
        <div>
            <!--插槽：显示父组件的模板内容-->
            <slot></slot>
        </div>
    </section>
</template>

<style scoped>
    section{
        width:1200px;
        margin:0px auto;
        cursor: pointer;
    }
    section > div:first-child{
        font-size:30px;
        margin:30px auto;
    }
    section > div:first-child > span{
        font-size:14px;
        color:#666666;
        margin-left:10px;
    }
    section > div:last-child{
        display:flex;
        justify-content:flex-start;
        flex-wrap: wrap;
    }
</style>
